#ifndef _PROTOCOL_H
#define _PROTOCOL_H
#endif

#define GET             0X55
#define PUT             0XAA
#define DELETE          0XFF

/*command packet */
typedef struct
{
    int type;
    int key_length;
    int value_length;
    int filling;
}COMPACK;

int conn_serv(struct sockaddr_in *servaddr);
int data_trans(int command, int sockfd, char *key, int key_len, char **value, int *value_len);
int recv_stat(int sockfd, char *buffer);
int recv_data(int sockfd, char *buffer, int data_size);

